package com.ex.interceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;

public class ProductInterceptor extends HandlerInterceptorAdapter {

	// 在所有被拦截的方法前，都会调用
	//  
	@Override
	public boolean preHandle(HttpServletRequest request,
			HttpServletResponse response, Object handler) throws Exception {
		
		System.out.println("进入到拦截器");
		
		String url = request.getRequestURI();

		System.out.println("url:" + url);
		
		return true;
	}
}
